<?php
	include '../config.php';
	include '../include/ez_sql_core.php';
	include '../include/ez_sql_mysql.php';
	mb_internal_encoding("UTF-8");
	$db = new ezSQL_mysql($config['db']['dbuser'],$config['db']['dbpw'],$config['db']['dbname'],$config['db']['dbhost']);
	$db->query('set names '.$config['db']['dbcharset']);
	$sql = "select id,part,title,DATE_FORMAT(time,'%m-%d') from contents where lang = 'sc' and part = 'news' and del = 0 order by time desc limit 4";
	$news_results = $db->get_results($sql,ARRAY_N);
	$sql = "select title,src,url from pic where lang = 'sc' and del = 0 order by queue asc , time desc limit 4";
	$img_results = $db->get_results($sql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页 - 华硕投资</title>
<meta name="copyright" content="2001-2011 hs-i.NET" />
<link rel="archives" title="华硕投资" href="http://www.hs-i.cc" />
<meta name="keywords" content="华硕投资" />
<meta name="generator" content="Media4Studio.com" />
<meta name="author" content="蓝龙互动传播机构" />
<meta name="copyright" content="2001-2011 华硕投资" />
<link rel="shortcut icon" href="/favorite.ico" type="image/x-icon" /> 
<link href="css/base.css" rel="stylesheet" type="text/css" />
<link href="css/index.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="main">
	<div class="head">
    	<h1 class="logo"><a href="/">华硕投资</a></h1>
        <div class="nav">
        	<a href="/sc/index.html" class="n1">首页</a>
            <a href="/sc/company/cp.html" class="company n2">公司概况</a>
            <a href="/sc/list/news.html" class="n3">新闻信息</a>
            <a href="/sc/list/services.html" class="n4">专业服务</a>
            <a href="/sc/list/projects.html" class="n5">项目介绍</a>
            <a href="/sc/contact/bi.html" class="n6">合作伙伴</a>
            <a href="/sc/index.html" class="lan">简体</a><a href="/tc/index.html" class="lan">繁体</a>
         <div class="box">
        	<ul>
            	<li>▪<a href="/sc/company/cp.html">公司简介</a></li>
                <li>▪<a href="/sc/company/ph.html">公司理念</a></li>
                <li>▪<a href="/sc/company/mt.html">管理团队</a></li>
                <li>▪<a href="/sc/company/ho.html">资质荣誉</a></li>
            </ul>
        </div>
        </div>
    </div>
    <div class="con">
    	<div class="i_con">
       	  <div class="i_new">
           	<h2><a href="/sc/list/news.html" class="flr">more</a><img src="images/sc/news_t.gif" width="64" height="17" alt="最新信息"/></h2>
              <img src="images/i_new.jpg"  class="i_ps"/>
            <ul>
				<?php
					$i = 0;
					foreach($news_results as $news_result){
						echo "<li>".$news_result[3]."<span class='line'>|</span><a href='/sc/view/".$news_result[0].".html'>".((mb_strlen($news_result[2]) > 16)?(mb_substr($news_result[2], 0, 16)."..."):$news_result[2]).(($i == 0)?("<img src='images/new.jpg' width='30' height='11' />"):"")."</a></li>";
						$i++;
					} 
				?>
              </ul>
            </div>
         <div class="hot">
   	      <img src="images/hot.jpg" width="340" height="114" />
          </div>
          <div class="log">
           	<h2><img src="images/sc/kehu.gif" width="64" height="17" alt="客户登陆"/></h2>
            <form>
            <p class="log_li"><input type="text" value="合同号" onfocus="if(value=='合同号') {value=''}" onblur="if (value=='') {value='合同号'}"></p>
            <p class="log_li"><input type="text" value="密码" onfocus="if(value=='密码') {value=''}" onblur="if (value=='') {value='密码'}"></p>
            <p><input name="" type="button" class="s_log"/></p>
            </form>
        </div>
    </div>
    </div>
    <div class="foot">
    	<div class="flt">
    	<p><img src="images/sc/fl.gif" width="417" height="37" alt="广州华硕投资有限公司" /></p>
        </div>
        <div class="f_menu">
       		<p class="fb"><a href="/sc/contact/cu.html" class="f1">联系我们</a><a href="/sc/contact/sm.html" class="f2">网站地图</a><a href="/sc/contact/ln.html" class="f3">法律声明</a><a href="/sc/contact/li.html" class="f4">友情链接</a><a href="#5" class="f5">企业邮局</a>
    </p>&nbsp;<script src="http://s14.cnzz.com/stat.php?id=3385713&web_id=3385713&show=pic1" language="JavaScript"></script>
        </div>
    </div>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/nav.js"></script>
<script src="js/jQuery.imgChange.js"></script>
<script type="text/javascript" src="js/bgstretcher.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
        //  Initialize Backgound Stretcher	   
		$(document).bgStretcher({
			images: ['images/index_bg1.jpg', 'images/index_bg2.jpg', 'images/index_bg3.jpg', 'images/index_bg4.jpg'],
			imageWidth: 1024, imageHeight: 548
		});
		var hot_data = [<?php
			$hot_data = "";
			foreach($img_results as $img_result){
				$hot_data .= '{"src":"/upload/index_img/sc/small/'.$img_result->src.'","href":"'.$img_result->url.'","target":"_blank","title":"'.$img_result->title.'"},';
			}
			echo rtrim($hot_data,",");
		?>];
	$(function(){
	$('.hot').imgChange({
		data:hot_data
	});});
	});
</script>
</body>
</html>
